<header class="header">
    <div class="left-menu-icon">
        <a href="javascript:;" class="navbar-btn sidebar-toggle" <?php if($member) { ?> data-toggle="offcanvas"<?php } ?> role="button">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </a>
    </div>
    <a href="<?=url('index/index')?>" class="logo"><?=$setting['web_title']?></a>
    <nav class="navbar navbar-static-top" role="navigation">
        <div class="navbar-right">
            <ul class="nav navbar-nav">
                <?php if($member) { ?>
                <li><span style="padding:0px 10px;line-height:50px;">ID : <?=$member['member_id']?></span></li>
                <?php } ?>
                <li class="dropdown lang lang-menu">
                    <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-globe"></i>
                        <span><?=$lang?></span>
                    </a>
                    <ul class="dropdown-menu dropdown-custom dropdown-menu-right">
                        <li>
                            <a href="javascript:;" data-url="<?=url('set_lang?lang=en')?>">English</a>
                            <a href="javascript:;"data-url="<?=url('set_lang?lang=zh')?>">简体中文</a>
                        </li>
                    </ul>
                </li>
                <?php if(!$member) { ?>
                    <li class="dropdown">
                        <a href="<?=url('member/login')?>" class="dropdown-toggle" ><span><?=L('login')?></span></a>
                    </li>
                    <li class="dropdown">
                        <a href="<?=url('member/reg')?>" class="dropdown-toggle" ><span><?=L('reg')?></span></a>
                    </li>
                <?php }else{ ?>
                <li class="dropdown user user-menu">
                    <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">
                        <i class="fa fa-user"></i>
                        <span><?=$member['nick']?> <i class="caret"></i></span>
                    </a>
                    <ul class="dropdown-menu dropdown-custom dropdown-menu-right">
                        <li class="dropdown-header text-center">Account</li>
                        <li>
                            <a href="<?=url('ucenter/in')?>">
                                <i class="fa fa-clock-o fa-fw pull-right"></i><?=L('pay',1)?>
                            </a>
                            <a href="<?=url('ucenter/out')?>">
                                <i class="fa fa-jpy fa-fw pull-right"></i><?=L('withdraw',1)?>
                            </a>
                        </li>
                        <li>
                            <a href="<?=url('ucenter/index')?>">
                                <i class="fa fa-user fa-fw pull-right"></i><?=L('ucenter',1)?>
                            </a>
                            <a href="<?=url('ucenter/setting')?>">
                                <i class="fa fa-cog fa-fw pull-right"></i><?=L('setting',1)?>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li><a href="<?=url('member/loginout')?>"><i class="fa fa-ban fa-fw pull-right"></i> <?=L('loginout',1)?></a></li>
                    </ul>
                </li>
                <?php } ?>
            </ul>
        </div>
    </nav>
</header>